<?php 
session_start();
include "../function/class-teacher.php";

$objTch = new Teacher();
?>
<table>
<tr><td width=1000 height=500>
	
	<table>
	<tr><td width=1000 height=50>
	<div align=center><font color="white" size=5>YOUR PERSONAL PROFILE</font></div>
	</td></tr>
	</table>
	<?php
	
				
	
				
				$tch = $_POST['getTch'];
				$con=mysqli_connect("localhost","root","","project");
			// Check connection
		
			
			$result = mysqli_query($con,"SELECT * FROM teachermember WHERE teacher_username='".$tch."'");
			
			while($row = mysqli_fetch_array($result))
			  {

?>
		<table id="show">
    	<tr><td width=1000 height=450>
        <center>
			<table> 
             <tr><td width=150><font color=white size=4>USERNAME</font></div></td>
             <td width=150><font color=white size=4 ><?php echo $row['teacher_username']; ?></font></td></tr>
             <tr><td width=150><font color=white size=4>FIRSTNAME</font></div></td>
             <td width=150><font color=white size=4><div id="edit01<?php echo $tch ?>"><?php echo $row['teacher_firstname']; ?></div></font></td></tr>
             <tr><td width=150><font color=white size=4>LASTNAME</font></td>
             <td width=150><font color=white size=4><div id="edit02<?php echo $tch ?>"><?php echo $row['teacher_lastname']; ?></div></font></td></tr>
             <tr><td width=150><font color=white size=4>NCU ID</font></td>
             <td width=150><font color=white size=4><?php echo $row['teacher_ncuid']; ?></font></td></tr>
             <tr><td width=150><font color=white size=4>E-MAIL</font></td>
             <td width=150><font color=white size=4><div id="edit03<?php echo $tch ?>"><?php echo $row['teacher_email']; ?></div></font></td></tr>
             <tr><td width=150><font color=white size=4>TEL.NUMBER</font></td>
             <td width=150><font color=white size=4><div id="edit04<?php echo $tch ?>"><?php echo $row['teacher_tel']; ?></div></font></td></tr>
             <tr><td width=150><font color=white size=4>FACULTY</font></td>
             <td width=150><font color=white size=4><?php echo $row['teacher_faculty']; ?></font></td></tr>
             </table>
             </center>
         </td></tr>
         </table>
         
         <table id="edit" style="display:none">
    	<tr><td width=1000 height=450>
        <center>
			<table> 
             <tr><td width=150><font color=white size=4>USERNAME</font></div></td>
             <td width=150><font color=white size=4><input id="editid" type="hidden" value="<?php echo $row['teacher_username']; ?>" />
			 <?php echo $row['teacher_username']; ?></font></td></tr>
             <tr><td width=150><font color=white size=4>FIRSTNAME</font></div></td>
             <td width=150><font color=white size=4><input type="text" id="editfirstname"  value="<?php echo $row['teacher_firstname']; ?>"/></font></td></tr>
             <tr><td width=150><font color=white size=4>LASTNAME</font></td>
             <td width=150><font color=white size=4><input type="text"  id="editlastname" value="<?php echo $row['teacher_lastname']; ?>" /></font></td></tr>
             <tr><td width=150><font color=white size=4>NCU ID</font></td>
             <td width=150><font color=white size=4><?php echo $row['teacher_ncuid']; ?></font></td></tr>
             <tr><td width=150><font color=white size=4>E-MAIL</font></td>
             <td width=150><font color=white size=4><input type="text"  id="editemail" value="<?php echo $row['teacher_email']; ?>" /></font></td></tr>
             <tr><td width=150><font color=white size=4>TEL.NUMBER</font></td>
             <td width=150><font color=white size=4><input type="text" id="edittel" value="<?php echo $row['teacher_tel']; ?>" /></div></font></td></tr>
             <tr><td width=150><font color=white size=4>FACULTY</font></td>
             <td width=150><font color=white size=4><?php echo $row['teacher_faculty']; ?></font></td></tr>
             </table>
             </center>
         </td></tr>
         </table>
              
<?php } ?>
	
	

</td></tr>
<tr><td height=50 width=1000>
<center>
<input id="tchedit" type="button" value="EDIT PROFILE"  onclick="tchedit('<?php echo $tch ?>');">
<input id="conedit" type="button" value="CONFIRM EDIT PROFILE"  onclick="tchConEdit('<?php echo $tch ?>');" style="display:none">
<input type="button" value="CANCLE" onclick="memberShowScitechInformation();">
</center>
</td></tr>
</table>
